package com.xmall.msg.entity.es;

import com.xmall.msg.base.BaseMsg;
import com.xmall.msg.base.MsgSourceType;
import lombok.Data;

import java.io.Serializable;

@Data
public class ProductUpdateMsg extends BaseMsg implements Serializable {

    /**
     * spuId
     */
    private Long spuId;

    /**
     * es版本
     */
    private Integer esVersion;

    public ProductUpdateMsg build(MsgSourceType msgSourceType, String exchange, String routingKey) {
        super.build(msgSourceType, exchange, routingKey);
        return this;
    }

    private void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    private void setEsVersion(Integer esVersion) {
        this.esVersion = esVersion;
    }

    public ProductUpdateMsg spuId(Long spuId) {
        this.spuId = spuId;
        return this;
    }

    public ProductUpdateMsg esVersion(Integer esVersion) {
        this.esVersion = esVersion;
        return this;
    }
}
